package controller

import (
	"github.com/gin-gonic/gin"
	"go-barrage/models"
	"go-barrage/response"
)

func GetVideoInfos(c *gin.Context) {
	videoInfo := models.GetAllVideoInfo()
	response.Success(c, videoInfo)
}

func GetVideoDetail(c *gin.Context) {
	videoShortId := c.Param("videoShortId")
	if videoShortId == "" {
		response.ParamError(c)
		return
	}
	response.Success(c, models.GetVideoInfoById(videoShortId))
}
